<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:p="http://primefaces.org/ui">
<body>
	<ui:composition>
		<p:dataTable var="itemreq" value="#{dtPurchaseOrderRequestView.requestDataModel}"
			selectionMode="single" selection="#{dtPurchaseOrderRequestView.selectedItem}">

			<p:ajax event="rowSelect"
				listener="#{dtPurchaseOrderRequestView.onRowSelect}"
				update=":poReqDlgForm:poRequestDetail" oncomplete="PF('poReqDialog').show()" />

			<p:column headerText="Item #" style="width:20px;">
				<h:outputText value="#{itemreq.itemNumber}" />
			</p:column>
			<p:column headerText="Description">
				<h:outputText value="#{itemreq.description}" />
			</p:column>
			<p:column headerText="Brand" style="width:100px;">
				<h:outputText value="#{itemreq.brand}" />
			</p:column>
			<p:column headerText="Part#" style="width:80px;">
				<h:outputText value="#{itemreq.partNumber}" />
			</p:column>
			<p:column headerText="Unit" style="width:50px;">
				<h:outputText value="#{itemreq.unit}" />
			</p:column>
			<p:column headerText="Requested Qty" style="width:55px;">
				<h:outputText value="#{itemreq.quantity}" />
			</p:column>
			<p:column headerText="Ordered Qty" style="width:55px;">
				<h:outputText value="#{itemreq.orderedQuantity}" />
			</p:column>
			<p:column headerText="Outstanding" style="width:75px;">
				<h:outputText value="#{itemreq.quantity - itemreq.orderedQuantity}" />
			</p:column>
		</p:dataTable>
	</ui:composition>
</body>
</html>